package modell;

public class Sekund extends Viser{
	
	private Viser minutt;
	
	public Sekund(Viser minutt, int max, int tall) {
		super(max, tall);
		this.minutt = minutt;
	}
	
	@Override
	public void tellOpp(){
		if (tall == max)
			minutt.tellOpp();
		super.tellOpp();
	}
	
	@Override
	public void tellNed(){
		if (tall <= min)
			minutt.tellNed();
		super.tellNed();
	}

}
